<template>
  <div class="mark-div__base" :style="{ width: width + 'px' }">
    {{ content }}
  </div>
</template>
<script lang="ts">
import { defineComponent } from "@vue/composition-api";

export default defineComponent({
  props: {
    content: {
      type: String,
      default: "",
    },
    width: {
      type: Number,
      default: 72,
    },
  },
});
</script>
<style lang="stylus">
$mark-line-color = rgba(7, 17, 27, 0.1);
$mark-font-color = rgb(147, 153, 159);
$mark-lineheight = 16px;
$mark-fontsize = 10px;
$mark-bgc = white;
$mark-borderradius = 2px;

.mark-div__base {
  display: inline-block;
  box-sizing border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  background-color: $mark-bgc;
  border: 1px solid $mark-line-color;
  border-radius: $mark-borderradius;
  line-height: $mark-lineheight;
  font-size: $mark-fontsize;
  color: $mark-font-color;
}
</style>
